You can create web pages by:
keying in text and HTML tags in a basic text editor, such as Windows Notepad | |
creating pages in a word processing, desktop publishing or other program and then saving as a web page – the program will automatically convert the pages for you | |
creating pages in a web authoring program, such as Microsoft Front Page or Macromedia Dreamweaver. |
Sometimes it is useful to combine more than one method – for example, create some pages using Microsoft Word or Microsoft Front Page and then edit the HTML in Notepad.
HTML has developed a lot over the past decade or so and it is now possible to add extra functionality, such as buttons, animation and forms, among many other things.
Most of these functions involve adding script (like programming code) to the basic HTML file – for example, XML and JavaScript. Many web authoring tools insert this script automatically, without you needing to key it all in and learn the different languages.
If you want to learn more about any of these advanced functions there are many books available and, of course, you can search for information on the Internet.
It is very useful to learn the basic HTML tags as you will find it easier to edit HTML that has been produced with another program.
Step-by-step instructions
1 | Launch Notepad by clicking 'Start' on the Windows task bar, selecting 'Programs', then 'Accessories' then Notepad (the process may vary slightly from system to system). |
2 | Key in the bold text below, pressing the 'Enter' key twice between each line: | |
<html> | This shows that the following information is in HTML. Without this tag, web browsers will not know that the page is a web page and will be unable to display the page. | |
<head> | This shows that the following text is the header information. | |
<title> </title> | You enter the title of the page here, in between the two tags; the title will be displayed in the browser's title bar. | |
</head> | This closes the header section. | |
<body> | This shows that the following text is the body information (the main section of the file). | |
</body> | This closes the body section (shows that the body section is finished). | |
</html> | This closes the HTML section and shows that the file is finished. It should be the last tag in the file. |
|
3 | Save the file as index.htm (select ‘File’ from the menu bar, then ‘Save As’, navigate to the folder where you store your files, key in index.htm in the ‘File Name’ box and click ‘Save’). |
1 | Key in the following title between the two title tags: My page |
2 | Key in the following body text between the two body tags: My page This is my page for learning HTML. I will be adding: different kinds of formatting lists images tables hyperlinks links to other pages. Different kinds of formatting |
In HTML, you can add paragraph and line breaks, headings and bold and italics, as well other more advanced types of formatting, which I may find out about later if I enjoy creating this simple web page. This line will display on a new line, using a line break tag. |
|
3 | Save your file by selecting ‘File’ from the menu bar and then selecting ‘Save’ from the drop-down menu. |
If you have been following the steps to create your own web page, then you will notice that the title bar shows the title of your page (My page). You will also see that all the text runs on without any of the line breaks or paragraph breaks that you might have typed. This is because, in HTML, you need to use a tag to show when there is a new paragraph or a line break.
The tags for paragraphs are <p> and </p>. The text of the paragraph needs to go in between these two tags. Text within the paragraph tags will be displayed with one blank line space above and below.
The tag for a line break is <br>. There is no closing tag for a line break. Text following a line break tag will appear on a new line, but there will be no blank line space in between.
<h1> </h1> – this is the biggest heading | |
<h2> </h2> – this is the next biggest heading | |
<h3> </h3> – this is the next biggest heading | |
<h4> </h4> – this is the next biggest heading | |
<h5> </h5> – this is the next biggest heading | |
<h6> </h6> – this is the smallest heading |
In most pages, the first three levels of heading will usually be enough.
The bold tag is <b> </b> – text in between these tags will be displayed in bold (darker and thicker than ordinary text). | |
The italics tag is <i> </i> – text in between these tags will be displayed in italics (a slanted version of ordinary text). |
There are other emphasis tags available in HTML. If you want to find out about them, there are many books about HTML and you can also do a search on the Internet.
Step-by-step instructions
1 | In the first paragraph, make the word ‘HTML’ bold, by entering the tag <b> before the word and the tag </b> after the word. |
2 | In the second paragraph, make the word ‘bold’ bold, by entering the tag <b> before the word and the tag </b> after the word. |
3 | Make the word 'italics' italic, by entering the tag <i> before the word and the tag </i> after the word. |
4 | Save your file by selecting ‘File’ from the menu bar and then ‘Save’ from the drop-down menu. |
5 | View your web page in your web browser. Notice where the bold and italics have appeared. |
<ul> – this is the opening bulleted list tag and tells the browser that a list is going to follow | |
<li> – this is the opening list item tag and tells the browser that the following text is an item in the list | |
</li> – this is the closing list item tag and tells the browser that the list item has ended | |
</ul> – this is the closing bulleted list tag and tells the browser that the list has ended |
Step-by-step instructions
1 | Add the tag <ul> at the beginning of the line starting ‘different kinds’ to show that a list is starting. |
2 | Add the tag <li> between the <ul> tag and the word ‘different’ to show that a list item is starting. |
3 | Add the tag </li> at the end of the line ‘different kinds of formatting’ to show that the list item has ended. |
4 | Add the <li> and </li> tags to the beginning and end of each of the other five lines in the list to show that each is a list item. |
5 | Add the tag </ul> at the end of the final line of the list (after the </li> tag) to show that the list has ended. |
6 | Save your file by selecting ‘File’ from the menu bar and then ‘Save’ from the drop-down menu. |
7 | View your web page in your web browser. The six lines you have formatted will now be displayed as a bulleted list. |
<ol> – this is the opening numbered list tag and tells the browser that a list is going to follow | |
<li> – this is the opening list item tag and tells the browser that the following text is an item in the list | |
</li> – this is the closing list item tag and tells the browser that the list item has ended | |
</ol> – this is the closing numbered list tag and tells the browser that the list has ended |
1 | At the end of the text (after the line beginning ‘This line will’), type in the following text: This is number one. This is number two. This is number three. |
2 | Add the tag <ol> at the beginning of the first line of this text (‘This is number one.’) to show that a list is starting. |
3 | Add the tag <li> between the <ol> tag and the word ‘This’ to show that a list item is starting. |
4 | Add the tag </li> at the end of the line (after ‘one.’) to show that the list item has ended. |
5 | Add the <li> and </li> tags to the beginning and end of each of the other two lines in the list to show that each is a list item. |
6 | Add the tag </ol> at the end of the final line of the list (after the </li> tag) to show that the list has ended. |
7 | Save your file by selecting ‘File’ from the menu bar and then ‘Save’ from the drop-down menu. |
8 | View your web page in your web browser. The three lines you have just added and formatted will now be displayed as a numbered list. |
You can only add images that are saved as .jpg or .gif files. | |
The images must be saved in the same folder as the web page (or in a folder within that folder). | |
You need to know the width and height of an image in ‘pixels’. To find these out, load your web browser (e.g. Internet Explorer) and select ‘File’ from the menu bar, then ‘Open’ or ‘Open File’, (click ‘Browse’ if neccessary), ensure the 'Files of type' box reads 'All Files', navigate to where your image is stored and double-click on it. With the right mouse button, click on the image and its properties will be displayed, including its dimensions in pixels (width always comes before height when describing dimensions). If you cannot open the image in your web browser, open it in a graphics program and check the help files for information on how to find out the image‘s dimensions. |
Where you want to place your image, type the following:
<img src="Image1.gif" width="100" height="200">
<img is the tag for an image | |
src="" indicates the file name and where it is located – if the file were located in a sub-folder called ‘Resources’ within the same folder as the web page, then it would read src="Resources/Image1.gif" | |
width="" indicates the width of the image in pixels | |
height="" indicates the height of the image in pixels | |
> closes the tag (NB like the <br> tag, the <img> tag does not have a closing tag to go with it) |
<table> </table> these are the table tags and identify any text within them as being part of a table | |
<tr> </tr> these are the row tags and identify any text within them as being part of a table row | |
<td> </td> these are the cell tags and identify any text within them as being part of a single cell of a table |
Before you create a table you need to decide how many columns and rows it will have. You may find it useful to draw a simple sketch on a scrap of paper to help you picture the table.
Row one: Cell number one | Row one: Cell number two | Row one: Cell number three |
Row two: Cell number one | Row two: Cell number two | Row two: Cell number three |
Row three: Cell number one | Row three: Cell number two | Row three: Cell number three |
1 | At the end of the web page (before the </body> tag), type in: <table> </table> |
2 | In between the two table tags, type in: <tr> </tr> |
3 | In between the two row tags, type in: <td> Row one: Cell number one </td> |
4 | After the closing tag (</td>), type in: <td> Row one: Cell number two </td> |
5 | After the second closing tag (</td>), type in: <td> Row one: Cell number three </td> |
6 | Enter the second row of the table: between the closing row tag (</tr>) and the closing table tag (</table>), type in: <tr> <td> Row two: Cell number one </td> <td> |
Row two: Cell number two </td> <td> Row two: Cell number three </td> </tr> | |
7 | Enter the third row of the table: between the closing row tag (</tr>) and the closing table tag (</table>), type in: <tr> <td> Row three: Cell number one </td> <td> Row three: Cell number two </td> <td> Row three: Cell number three </td> </tr> |
8 | Save your file by selecting ‘File’ from the menu bar and then ‘Save’ from the drop-down menu. |
9 | View your web page in your web browser. The table you have just added should appear at the bottom of your web page. |
<table border="1"> gives the table a border of 1 pixel | |
<table border="0"> ensures the table has no border | |
<table border="5"> gives the table a border of 5 pixels |
<table cellpadding="5"> gives a space of 5 pixels | |
<table cellpadding="10"> gives a space of 10 pixels |
Hyperlinks are added using the <a href> </a> tags (words in between the two tags will appear on the web page).
The following tag would be a link to a web page with the file name ‘Haunting’ located in the folder ‘Stories’:
<a href="Stories/Haunting.htm">Read my story The Haunting</a>
The following tag would be a link to a web page with the file name ‘Contact’ located in the same folder as the web page:
<a href="Contact.htm">Find out how to contact me</a>
For a hyperlink to work, you must:
have a file to link to – if the file doesn’t exist, then the web browser won’t be able to find it | |
enter the correct file name (and folder if necessary) – if you enter the wrong file name or forget to enter the folder name followed by / the web browser won’t know what to link to and won’t be able to display the page | |
always add the extension .htm after the filename – the web browser needs to know that you are linking to another HTML file rather than, for example, a Word document or text file. |
Hyperlinks to other websites are added using the
<a href> </a> tags (words in between the two tags will appear on the web page).
The following tag would be a link to the Heinemann website:
<a href="http://www.hi.com.au">Visit Heinemann</a>
For a hyperlink to another website to work, you must:
know the URL (web address) of the website/webpage (this is displayed in the address box in your browser and always starts with http://; usually it also has www. in as well, although not always) | |
enter the correct URL, remembering to include http://; at the beginning. |
This facility can be extremely useful as it can save you a lot of time (as you will guess if you went through the HTML step-by-step instructions). If you are creating fairly simple web pages, then using a word processing or desktop publishing program to create them and then ‘Saving as HTML’ can often be the best way to go about it. It can be particularly useful if you are very familiar with the software package but not very confident with HTML or web authoring tools.
You should note, though, that sometimes these programs will produce pages that look quite different depending on the browser they are viewed in. You also lose some of the control you have if you are creating the web pages yourself by entering HTML code.
Most of them also provide facilities for organising the files for your website and also tend to make inserting images fairly easy.
Some web authoring programs, such as Macromedia Dreamweaver, allow you to edit the HTML tags as well. This ability gives you a lot of control over how your web pages will be displayed.
The many web authoring programs available include:
Microsoft FrontPage | |
Macromedia Dreamweaver | |
Adobe GoLive. |
Using an FTP program
FTP means File Transfer Protocol. It can be used for uploading your files to your Internet Service Provider’s (ISP’s) computer. When you buy webspace (or get it free from your ISP), you will usually be given instructions on how to get your website onto the Internet. You may also be given an FTP program to download to your computer.
This is the way Yahoo’s registration works: